/*
 * service_mutex.h
 *
 *  Created on: 06/04/2010
 *      Author: bruno.silva
 */

#ifndef SERVICE_MUTEX_H_
#define SERVICE_MUTEX_H_

#include "target.h"
#include "kernel_FreeRTOS.h"

#ifndef service_mutex_MAX_DELAY
	#define service_mutex_MAX_DELAY portMAX_DELAY 
#endif

typedef xSemaphoreHandle service_mutex_Mutex;

#define service_mutex_CreateMutex() xSemaphoreCreateMutex()
#define service_mutex_TakeMutex(mutext, time) xSemaphoreTake(mutext, time)
#define service_mutex_GiveMutex(mutex) xSemaphoreGive(mutex)

#endif /* SERVICE_MUTEX_H_ */
